# basic, equivalent to map
a = [x**2 for x in range(5)]
b = map((lambda x:x**2),range(5))
print b


# filter
a = [x for x in range (5) if x % 2 == 0]
print a
b = filter( (lambda x: x%2 == 0), range(5))
print b

# nested
a = [y for x in range(5) for y in range(3)]
print a
